﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CreateTask.aspx.cs" Inherits="TaskWebApplicationUI.CreateTaskView"
    ValidateRequest="false" MasterPageFile="WebTasksMaster.Master" Theme="TaskTheme" %>

<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MasterPagePlaceHolder" runat="server">
    <p align="center">
        <asp:Label ID="Department" runat="server" Text="Отдел" Font-Bold="False" SkinID="Department"></asp:Label>
    </p>
    <table class="spisok" style="width: 100%;">
        <tr>
            <td>
                <asp:Label ID="ErrorMessageLabel" runat="server" Font-Bold="True" ForeColor="Red"
                    CssClass="bodyt"></asp:Label>
            </td>
        </tr>
    </table>
    <div>
        <table class="spisok" style="width: 100%; border: none;">
            <th style="width: 50%;" valign="top">
                <table class="spisok" style="width: 100%; border: none;">
                    <tr>
                        <th style="width: 1%">
                            <asp:Label ID="Label8" runat="server" Text="Название:"></asp:Label>
                        </th>
                        <td>
                            <asp:TextBox ID="TaskNameTB" runat="server" Width="99%" EnableViewState="False" Wrap="False"
                                CssClass="bodyt" MaxLength="50"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th style="width: 1%">
                            <asp:Label ID="Label1" runat="server" Text="Срок:"></asp:Label>
                        </th>
                        <td>
                            <dx:ASPxDateEdit ID="dxExpirationDate" runat="server" EditFormat="DateTime" EditFormatString="dd/MM/yyyy HH:mm tt" EnableTheming="True" DateOnError="Null" AllowNull="True">
                                <TimeSectionProperties Visible="True">
                                </TimeSectionProperties>
                            </dx:ASPxDateEdit>
                        </td>
                    </tr>
                    <tr>
                        <th style="width: 1%">
                            <asp:Label ID="Label2" runat="server" Text="Подразделение:"></asp:Label>
                        </th>
                        <td>
                            <asp:DropDownList ID="DepartmentsDDL" runat="server" Width="100%" DataValueField="ID"
                                DataTextField="Name" CssClass="bodyt">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th style="width: 1%">
                            <asp:Label ID="Label3" runat="server" Text="Ответственный:"></asp:Label>
                        </th>
                        <td>
                            <asp:DropDownList ID="ExecutorsDDL" runat="server" Width="100%" DataValueField="ID"
                                DataTextField="Name" AppendDataBoundItems="True" CssClass="bodyt">
                                <asp:ListItem Value="00000000-0000-0000-0000-000000000000">Не определен</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th style="width: 1%">
                            <asp:Label ID="Label4" runat="server" Text="Приоритет:"></asp:Label>
                        </th>
                        <td>
                            <asp:DropDownList ID="PrioritiesDDL" runat="server" DataTextField="Name" DataValueField="ID"
                                Width="100%" CssClass="bodyt">
                                <asp:ListItem Value="0">Задача не терпит отлагательств (7)</asp:ListItem>
                                <asp:ListItem Value="1">Очень высокий (6)</asp:ListItem>
                                <asp:ListItem Value="2">Высокий (5)</asp:ListItem>
                                <asp:ListItem Value="3">Выше среднего (4)</asp:ListItem>
                                <asp:ListItem Value="4">Средний (3)</asp:ListItem>
                                <asp:ListItem Value="5">Низкий (2)</asp:ListItem>
                                <asp:ListItem Value="6">Очень Низкий (1)</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
            </th>
        </table>
        <td style="width: 50%;">
            <table class="spisok" style="width: 100%; border: none;">
                <tr>
                    <th style="width: 1%">
                        <strong>
                            <asp:Label ID="Label5" runat="server" Text="Участники:"></asp:Label></strong>
                    </th>
                    <td>
                        <asp:UpdatePanel ID="SearchParticipantsPanel" runat="server">
                            <ContentTemplate>
                                <asp:TextBox ID="UsersSearchTB" runat="server" AutoPostBack="True" OnTextChanged="ParticipantSearch_TextChanged"
                                    Wrap="False" Width="65px" CssClass="bodyt" ToolTip="Введите буквы, содержащиеся в ФИО пользователя, выберите в выпадающем списке пользователя для добавления."></asp:TextBox>
                                <asp:DropDownList ID="UsersDDL" runat="server" DataTextField="Text"
                                    DataValueField="ID" CssClass="bodyt">
                                </asp:DropDownList>
                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/adduser.png" OnClick="ImageButton1_Click"
                                    ToolTip="Добавить пользователя" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <th></th>
                    <td>
                        <asp:UpdatePanel ID="ParticipantsArea" runat="server">
                            <ContentTemplate>
                                <asp:GridView ID="ParticipantsGridView" runat="server" AutoGenerateColumns="False"
                                    BorderWidth="1px" BackColor="White" GridLines="Vertical" CellPadding="4" BorderStyle="None"
                                    BorderColor="#DEDFDE" ForeColor="Black" Width="100%" ShowHeader="False" OnRowDeleting="ParticipantsView_RowDeleting"
                                    DataKeyNames="ID" CssClass="bodytr" EnableModelValidation="True">
                                    <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>
                                    <Columns>
                                        <asp:TemplateField HeaderText=" " SortExpression="Name">
                                            <ItemTemplate>
                                                <span onclick=" getShortName(this); "><%#Eval("Name")%></span>
                                            </ItemTemplate>
                                            <HeaderStyle CssClass="bodyt" />
                                            <ItemStyle CssClass="bodyt" Height="0%" VerticalAlign="Top" Width="1%"
                                                Wrap="False" />
                                        </asp:TemplateField>
                                        <asp:CommandField ShowDeleteButton="True" DeleteText="Удалить" ItemStyle-CssClass="bodyt"
                                            HeaderStyle-CssClass="bodyt" ItemStyle-Wrap="false" ItemStyle-Width="1%">
                                            <HeaderStyle CssClass="bodyt" />
                                            <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" />
                                        </asp:CommandField>
                                        <asp:BoundField DataField="ID" ItemStyle-CssClass="bodyt" HeaderStyle-CssClass="bodyt"
                                            Visible="False" ItemStyle-Wrap="false" ItemStyle-Width="1%">
                                            <HeaderStyle CssClass="bodyt" />
                                            <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" />
                                        </asp:BoundField>
                                    </Columns>
                                    <SelectedRowStyle ForeColor="White" Font-Bold="True" BackColor="#CE5D5A"></SelectedRowStyle>
                                    <RowStyle BackColor="#F7F7DE"></RowStyle>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <th style="width: 1%">
                        <asp:Label ID="Label9" runat="server" Text="Файлы:" Font-Bold="True"></asp:Label>
                    </th>
                    <td>
                        <asp:FileUpload ID="FileUpload3" runat="server" Width="50%" CssClass="bodyt" />
                        <asp:FileUpload ID="FileUpload2" runat="server" Width="50%" CssClass="bodyt" />
                        <asp:FileUpload ID="FileUpload4" runat="server" Width="50%" CssClass="bodyt" />
                        <asp:FileUpload ID="FileUpload5" runat="server" CssClass="bodyt" Width="50%" />
                        <asp:FileUpload ID="FileUpload6" runat="server" CssClass="bodyt" Width="50%" />
                    </td>
                </tr>
            </table>
        </td>
        <table class="spisok" style="width: 100%; border: none;">
            <tr>
                <td colspan="2">
                    <CKEditor:CKEditorControl ID="Editor" runat="server"></CKEditor:CKEditorControl>
                    <table id="Table1" cellspacing="0" cellpadding="0" width="100%" style="height: 10px">
                        <tr>
                            <td>
                                <asp:ImageButton ID="BtnAddComment" runat="server" ImageUrl="images/save.png" OnClick="ImageButton2_Click" />
                            </td>
                            <td align="right"></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
